<template>
	<div class="pic-preview">
		<div class="item" v-for="item in listDataStr&&listDataStr.split(',').filter(item=>item)||[]">
			<div class="pic" @click="preview(item)">
				<image :src="ossPath+item" mode="aspectFill"></image>
			</div>
		</div>
		<div class="nomore" v-if="!listDataStr">{{$t("暂未上传")}}</div>
	</div>
</template>

<script>
	import {
		IMAGE_URL
	} from "@/config/app.js"
	export default {
		props: ["listDataStr"],
		data() {
			return {
				ossPath: IMAGE_URL
			}
		},
		methods: {
			preview(path) {
				if (!path) return
				path = this.ossPath + path
				uni.previewImage({
					urls: [path],
					current: path
				})
			},
		}
	}
</script>

<style>
	.nomore {
		text-align: center;
		color: #999;
		font-size: 24rpx;
		width: 100%;
		padding: 50rpx 0;
	}
</style>